﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="LedgerAllocation.aspx.cs" Inherits="Main_Inventory_LedgerAllocation" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/User Controls/PageHeading.ascx" TagName="heading" TagPrefix="acc" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Ledger Allocation</title>
    <link href="../../Styles/accounts.css" rel="stylesheet" type="text/css" />
   <%-- <script src="../../Menu/js/jquery.min.js" type="text/javascript"></script>--%>
     <script src="../../JavaScript/jquery-1.4.2.min.js" type="text/javascript"></script>   
    <script src="../../JavaScript/ModalPopups.js" type="text/javascript"></script>
     <style type="text/css"> 
         .hidden
         {
               display: none;
         }  
           #wrapper {
            width:90%;
            margin-left:5%;
            margin-top:15px;
        }
        ul.tabs {
            width:99%;
            margin:0;
            padding:0;
        }
        ul.tabs li {
            display:block;
            float:left;
            padding:0 7px;
        }
        ul.tabs li a {
            display:block;
            float:left;
            padding:7px;
            font-size:0.8em;
            background-color:#e0e0e0;
            color:#666;
            text-decoration:none;
        }
        .selected {
            font-weight:bold;
        }
        .tab-content {
	        clear:both;
            border:1px solid #ddd;
            padding:10px;
        }
    </style>
        <script type="text/javascript">
            $(document).ready(function() {

                $('.tabs a').click(function() {
                    switch_tabs($(this));
                });

                switch_tabs($('.defaulttab'));

            });

            function switch_tabs(obj) {
                $('.tab-content').hide();
                $('.tabs a').removeClass("selected");
                var id = obj.attr("rel");

                $('#' + id).show();
                obj.addClass("selected");
            }
        </script> 
</head>
<body>
    <form id="form1" runat="server">
    <div>
         <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" EnablePartialRendering="true">
        </asp:ScriptManager>
         <asp:Panel ID="PnlAddNew" runat="server" Visible="false">
        <asp:UpdateProgress DynamicLayout="false" ID="UpdProgress" runat="server">
            <ProgressTemplate>
                <div align="center">
                    <img src="../../../Images/ajax-loader.gif" /></div>
            </ProgressTemplate>
        </asp:UpdateProgress>
        <div class="divmain">
            <acc:heading ID="header1" runat="server" HeadingText="Ledger Allocation" />
        </div>
         <div style="text-align: center; width: 50%; margin-left: 22%; margin-right: 25%">
            <asp:Label ID="lblMsg" runat="server" Font-Bold="true"></asp:Label>
         </div>
         <div id="wrapper">    
            <ul class="tabs">
                <li><a href="javascript:void(0)" class="defaulttab" rel="divSale"> Sales: Tax Wise Classifications</a></li>
                <li><a href="javascript:void(0)" rel="divPurchase">Purchase: Tax Wise Classifications  </a></li>            
            </ul>
             <div class="tab-content" id="divSale" runat="server">
             <table class="tablecontent" style="width:97%; ">
               <tr>
                <td style="width:20%; font-weight:bold; height:22px; text-align:center; border-right: solid 1px #818181"> Main Class</td>
                <td style="width:20%; font-weight:bold; height:22px; text-align:center; border-right: solid 1px #818181"> Sub Class </td> 
                <td style="width:20%; font-weight:bold; height:22px; text-align:center; border-right: solid 1px #818181"> From Date </td>
                <td style="width:20%; font-weight:bold; height:22px; text-align:center; border-right: solid 1px #818181"> To Date </td>
                <td style="width:20%; font-weight:bold; height:22px; text-align:center; border-right: solid 1px #818181"> Purchase Ledger</td>
               </tr>              
               <tr>
                 <td colspan="5"></td>
               </tr>
             </table>
               <table style="height:22px">
                        <tr>
                            <td style="font-weight:bold;">
                                Tax Type: Central Sales Tax
                            </td>
                            
                        </tr>
                </table>      
             <div>
              <asp:GridView ID="GrdInter" runat="server" CssClass="gridview" Width="97%" RowStyle-CssClass="gridviewitem"
                        PagerStyle-CssClass="pgr"  
                     AlternatingRowStyle-CssClass="gridview_alternate" AutoGenerateColumns="false"
                        EmptyDataRowStyle-CssClass="emptyrow" EmptyDataText="No Record Exist!" ShowHeader="false"
                     onrowdatabound="GrdInter_RowDataBound" onrowcreated="GrdInter_RowCreated"  
                    >
                    <Columns>
                    <asp:BoundField DataField="mainclassname" ItemStyle-Width="20%" />
                    <asp:BoundField  DataField="subclassname" ItemStyle-Width="20%" />
                    <asp:BoundField  DataField="efffromdate" DataFormatString="{0:dd/MMM/yyyy}" ItemStyle-Width="20%" />
                    <asp:BoundField DataField="efftodate" DataFormatString="{0:dd/MMM/yyyy}" ItemStyle-Width="20%" /> 
                    <asp:TemplateField ItemStyle-Width="20%" >
                    <ItemTemplate>
                    <asp:HiddenField ID="HidTxdetid" runat="server" Value='<%#Eval("TXDETID")%>' />
                     <asp:HiddenField ID="HidPurLed" runat="server" Value='<%#Eval("PURCSALE_LID")%>' />
                    <asp:DropDownList ID="DDlInterledger" runat="server" CssClass="dropdown" ></asp:DropDownList>
                    </ItemTemplate>
                    </asp:TemplateField>
                    </Columns>
              </asp:GridView>
                 <table style="height:22px">
                            <tr>
                                <td style="font-weight:bold;">
                                    Tax Type: Value Added Tax
                                </td>
                                
                            </tr>
                  </table>
                  <div>
                     <asp:GridView ID="GrdLocal" runat="server" CssClass="gridview" Width="97%" RowStyle-CssClass="gridviewitem"
                        PagerStyle-CssClass="pgr" AutoGenerateColumns="false" AlternatingRowStyle-CssClass="gridview_alternate"
                        EmptyDataRowStyle-CssClass="emptyrow" EmptyDataText="No Record Exist!" ShowHeader="false"
                          onrowdatabound="GrdLocal_RowDataBound" >
                         <Columns>
                         <asp:BoundField  DataField="mainclassname" ItemStyle-Width="20%" />
                            <asp:BoundField  DataField="subclassname" ItemStyle-Width="20%" />
                            <asp:BoundField DataField="efffromdate" DataFormatString="{0:dd/MMM/yyyy}" ItemStyle-Width="20%" />
                            <asp:BoundField  DataField="efftodate" DataFormatString="{0:dd/MMM/yyyy}" ItemStyle-Width="20%"  /> 
                            <asp:TemplateField ItemStyle-Width="20%">
                            <ItemTemplate>
                             <asp:HiddenField ID="HidTxdetid" runat="server" Value='<%#Eval("TXDETID")%>' />
                             <asp:HiddenField ID="HidPurcLed" runat="server" Value='<%#Eval("PURCSALE_LID")%>' />
                            <asp:DropDownList ID="DDlLocalledger" runat="server" CssClass="dropdown"></asp:DropDownList>
                            </ItemTemplate>
                            </asp:TemplateField>
                    </Columns>
                    </asp:GridView>
                  </div>
              </div>
             </div>
             <div class="tab-content" id="divPurchase" runat="server">
               <table class="tablecontent" style="width:97%; ">
                   <tr>
                    <td style="width:33%; font-weight:bold; height:22px; text-align:center; border-right: solid 1px #818181">Item Code</td>
                    <td style="width:33%; font-weight:bold; height:22px; text-align:center; border-right: solid 1px #818181">Item Name</td> 
                    <td style="width:33%; font-weight:bold; height:22px; text-align:center; border-right: solid 1px #818181"> Purchases Ledger </td>
                   </tr>              
                   <tr>
                     <td colspan="3"></td>
                   </tr>
             </table>
                 <div>
                     <asp:GridView ID="GrdItem" runat="server" CssClass="gridview" Width="97%" RowStyle-CssClass="gridviewitem"
                        PagerStyle-CssClass="pgr" AutoGenerateColumns="false" AlternatingRowStyle-CssClass="gridview_alternate"
                        EmptyDataRowStyle-CssClass="emptyrow" ShowHeader="false" EmptyDataText="No Record Exist!" onrowdatabound="GrdItem_RowDataBound">
                         <Columns>
                            <asp:BoundField DataField="ITMCODE"  ItemStyle-Width="33%" />
                            <asp:BoundField DataField="ITMDESC" ItemStyle-Width="33%" />
                            <asp:TemplateField ItemStyle-Width="33%" >
                            <ItemTemplate>
                            <asp:HiddenField ID="HidItmid" runat="server" Value='<%#Eval("ITMID")%>' /> 
                            <asp:HiddenField ID="HidPurLed" runat="server" Value='<%#Eval("PURCLEDGER_LID")%>' />
                            <asp:DropDownList ID="DDlItemledger" runat="server" CssClass="dropdown" ></asp:DropDownList>
                            </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                  </div>             
             </div>
        </div>
        
       <div style="width:100%; text-align:center; margin-top:10px">
           <asp:Button ID="BtnSubmit" runat="server" Text="Save" CssClass="button" 
               onclick="BtnSubmit_Click" />&nbsp;
           <asp:Button ID="BtnCancel" runat="server" Text="Cancel" CssClass="button" 
               onclick="BtnCancel_Click"  />
       </div>
         </asp:Panel>
         
          <asp:Panel ID="PnlView" runat="server" Visible="false">
          
          </asp:Panel>
    </div>
    </form>
</body>
</html>
